Making 8-bit Arcade Games in C by Steven Hugg

Making 8-bit Arcade Games in C by Steven Hugg

Author:Steven Hugg [Hugg, Steven]
Language: eng
Format: azw3, pdf
Publisher: Puzzling Plans LLC
Published: 2017-04-25T04:00:00+00:00


17

The Galaxian Hardware

17.1 History Namco’s first game was Gee Bee, a pinball-inspired breakoutstyle game. Galaxian was their follow-up, inspired by the recently released Space Invaders as well as the first Star Wars movie.8

The Galaxian hardware pushed the limit of video game designs in 1979. At its core is a Z80 CPU at 3.072 MHz. The graphics system featured color RGB graphics and multicolor hardware sprites overlapping a tiled background. (At the time, the term “sprite” had not yet been coined, so designers called them “stamps.”)

The designers would reuse the same PCB (printed circuit board) for King & Balloon, and also for the legendary sequel Galaga. Other companies like Konami licensed the video hardware to make games like Scramble and Frogger.

Figure 17.1: Galaxian, King & Balloon, Scramble, and Frogger

17.1. History The Scramble hardware was a popular target for ports and bootlegs of other Z80-based games. Crazy Kong for instance was a bootleg of Donkey Kong, identical except for the color palette and sound. Even Scramble itself was hacked to run on older Galaxian hardware!

Galaxian uses a 32x28 tilemap like the VIC Dual hardware, but each column can be assigned separate color attributes. Also, individual columns can be scrolled left and right, or up and down if the monitor is in landscape orientation.

Galaxian’s sprites are 16x16 bitmaps with three colors (plus one transparent color) that can be positioned anywhere on the screen. They overlap the background tilemap and also each other. Galaxian uses sprites for attacking aliens — for aliens in formation, tiles are used, along with the column-scrolling feature to move them around. There can be up to eight sprites on a given scanline.

There are also eight “bullets” that can be separately positioned and show up on the screen as short vertical lines (on Scramble hardware, they show up as single pixels). Only two bullets can appear on a given scanline. Bullet #7 — the player’s bullet — appears as a separate color and has priority over the others.

To see it on 8bitworkshop.com: Select the Scramble Hardware platform, then select the Graphics Test file.

17.2 Memory Map

We’ve chosen the Scramble memory map for our emulator — it’s similar to Galaxian and used as the basis for many other games: Start End Description R/W

$0000 $3FFF ROM read $4000 $47FF program RAM r/w $4800 $4BFF video RAM write $4C00 $4FFF video RAM (mirror) write $5000 $50FF object RAM write $6801 enable interrupt write $6803 enable blue background write $6804 enable stars write $7000 watchdog timer read $8100 input 0 read $8101 input 1 read $8102 input 2 read

Table 17.1: Scramble Memory Map

The Galaxian hardware is similar except for these changes: Start End Description R/W $6000 input 0 read $6800 input 1 read $7000 input 2 read $7800 watchdog timer read $7001 enable interrupt write $7004 enable stars write

Table 17.2: Galaxian Memory Map

The tilemap is defined as a 32x32 byte array, defined here as the variable vram:

byte __at (0x4800) vram[32][32]; // 32x32 cells

Each byte selects one of the 256 available tiles.

PORTRAIT [29][0] [2][0]

[29][31]

[2][31]

LANDSCAPE

[2][0]

[29][0]

Figure 17.2: Galaxian video RAM layout Some of the tiles are o ffscreen.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.